<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{margin: 0;padding: 0;}
        #box{width: 150px;height: 150px;background-color: red;
        border: 10px solid #000;padding:20px;}
    </style>
</head>
<body>
    <div id="box"></div>
    <!-- innerHeight() height+padding -->
    <!-- outerHeight() height+padding+border -->
    <script src="./jquery-1.12.4.js"></script>
    <script>
        $(function(){
            // alert($("#box").innerHeight())


            // 推荐outer
            alert($("#box").outerHeight())
        })

    </script>

</body>
</html>